var app = getApp();
Page({
  data: {
    bannerList: [],
    recommendList : [
    ],
	/* 146 * 146 rpx*/
    cateList : []
  },

  onLoad: function (options) {
	  console.log("share_id:"+options.share_user_id);
	  let token = wx.getStorageSync('token') || '';
	  let share_user_id = options.share_user_id || 0;
	  console.log("token:"+token);
	  var that = this;
	  app.request('/index/index', {
		  token:token,
		  share_user_id: share_user_id
	  }, function(data, ret) {
	    console.log(data);
		that.setData({
			bannerList: data.bannerList,
			cateList:data.cateList,
			recommendList:data.recommendList
		});
	  }, function(data, ret) {
	    that.error(ret.msg);
	  });
  },
})
